\defmodule {JohnsonSUGen}

This class implements random variate generators for the
{\em Johnson $S_U$\/} distribution.


\bigskip\hrule

\begin{code}
\begin{hide}
/*
 * Class:        JohnsonSUGen
 * Description:  random variate generators for the Johnson $S_U$ distribution
 * Environment:  Java
 * Software:     SSJ
 * Copyright (C) 2001  Pierre L'Ecuyer and Universite de Montreal
 * Organization: DIRO, Universite de Montreal
 * @author
 * @since

 * SSJ is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License (GPL) as published by the
 * Free Software Foundation, either version 3 of the License, or
 * any later version.

 * SSJ is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at
   <a href="http://www.gnu.org/licenses">GPL licence site</a>.
 */
\end{hide}
package umontreal.iro.lecuyer.randvar;\begin{hide}
import umontreal.iro.lecuyer.rng.*;
import umontreal.iro.lecuyer.probdist.*;
\end{hide}

public class JohnsonSUGen extends JohnsonSystemG \begin{hide} {
\end{hide}\end{code}

\subsubsection* {Constructors}
\begin{code}

   public JohnsonSUGen (RandomStream s, double gamma, double delta,
                        double xi, double lambda) \begin{hide} {
      super (s, new JohnsonSUDist(gamma, delta, xi, lambda));
      setParams (gamma, delta, xi, lambda);
   }\end{hide}
\end{code}
\begin{tabb} Creates a JohnsonSU random variate generator.
\end{tabb}
\begin{code}

   public JohnsonSUGen (RandomStream s, JohnsonSUDist dist) \begin{hide} {
      super (s, dist);
      if (dist != null)
         setParams (dist.getGamma(), dist.getDelta(), dist.getXi(),
                    dist.getLambda());
   } \end{hide}
\end{code}
 \begin{tabb}  Creates a new generator for the JohnsonSU
   distribution \texttt{dist}, using stream \texttt{s}.
 \end{tabb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection* {Methods}
\begin{code}

   public static double nextDouble (RandomStream s, double gamma,
                                    double delta, double xi, double lambda) \begin{hide} {
      return JohnsonSUDist.inverseF (gamma, delta, xi, lambda,
                                        s.nextDouble());
   }\end{hide}
\end{code}
 \begin{tabb}  Uses inversion to generate a new JohnsonSU variate,
   using stream \texttt{s}.
 \end{tabb}
\begin{hide}
\begin{code}
}\end{code}
\end{hide}
